chooseImage(sourceType = ['album', 'camera'], sizeType = ['original', 'compressed'], count = 1) {
    return new Promise((resolve, reject) => {
        uni.chooseImage({
            sourceType,
            sizeType,
            count,
            success: (res) => {
                resolve(res.tempFilePaths);
            },
            fail: (err) => {
                reject(err);
            }
        });
    });
},

takePhoto() {
    return new Promise((resolve, reject) => {
        uni.chooseImage({
            sourceType: ['camera'],
            sizeType: ['original'],
            count: 1,
            success: (res) => {
                resolve(res.tempFilePaths[0]);
            },
            fail: (err) => {
                reject(err);
            }
        });
    });
},
